import axios from '@/utils/request';
import qs from 'qs';

const getList = (options) => {
  return axios.get('/public/list?' + qs.stringify(options));
};

// 温馨提醒
const getTips = () => {
  return axios.get('/public/tips');
};

// 友情链接
const getLink = () => {
  return axios.get('/public/links');
};

// 热议文章
const getHotList = () => {
  return axios.get('/public/topWeek');
};

// 置顶文章
const getTopList = () => {
  return axios.get('/public/top');
};

// 上传图片接口
const uploadImg = (formData) => axios.post('/content/uploadImg', formData);

export {
  getList,
  getTips,
  getHotList,
  getLink,
  getTopList,
  uploadImg
};
